package com.jx.servicrimpl;

import com.jx.dao.FindSomeAdminsDao;
import com.jx.daoimpl.FindSomeAdminsDaoImpl;
import com.jx.service.FindSomeAdminsService;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class FindSomeAdminsServiceImpl implements FindSomeAdminsService{
	/**
	 * 模糊查询搜索的管理员
	 * @author zzzzzzz
	 *
	 */
	FindSomeAdminsDao fsad=new FindSomeAdminsDaoImpl();
	@Override
	public JSONObject findSomeAdminService(String searchname,int start,int pagesize) {
		// TODO Auto-generated method stub
		JSONObject json=new JSONObject();
		//分页
		json.put("total", fsad.findTotalAdmin(searchname));
		json.put("rows", JSONArray.fromObject(fsad.findSomeAdminsDao(searchname,start,pagesize)));
		return json;
	}

}
